#include "Shm.hpp"
// 这个文件复杂打开共享内存，并且往里面写数据

int main()
{
    shm m(pathname, projid, CREATER);
    m.Create();
    char *mem = (char *)m.getmem();
    int index = 0;
    for (char c = 'A'; c <= 'Z'; c++, index+=2)
    {
        sleep(1);
        mem[index] = c;
        mem[index + 1] = c;
        sleep(1);
        mem[index + 2] = 0;  //强行停止
    }
    return 0;
}